import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';

class ImageStyle {
  static get fadeInFrame => (BuildContext context, Widget child, int frame,
          bool wasSynchronouslyLoaded) {
        if (wasSynchronouslyLoaded ?? false) {
          return child;
        }
        return Stack(
          children: [
            Container(
              color: aceWhiteGreyColor,
            ),
            Positioned.fill(
              child: AnimatedOpacity(
                child: child,
                opacity: frame == null ? 0 : 1,
                duration: const Duration(seconds: 1),
                curve: Curves.easeOut,
              ),
            ),
          ],
        );
      };
}
